<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr = ['a',1,2,3,4,5]
        for(const item of arr){
            if(item >= 3){
                break;
            }
        }

        let arr1 = [
            {name:'aaa',age:19},
            {name:'bbb',age:19},
            {name:'ccc',age:19}
        ]
        for(const {name,age}of arr1){
            //console.log(name,age); 
        }

        //json
        //把json数据转成js数据：
        let json = '[{"name": "12","age":18},{"name": "13","age":20}]'
        let str = JSON.parse(json);

        //把js数据转成json字符窜数据：
        let obj = {
            name:'12',
            age:18
        }
        let json1 = JSON.stringify(obj);

    </script>
</body>
</html>